/*
 * @Author: zhangyang
 * @Date: 2022-01-13 15:52:07
 * @LastEditTime: 2022-01-14 15:41:44
 * @Description: 时间相关的工具函数
 */
export const sleep = (n: number) => new Promise((resolve) => setTimeout(resolve, n * 1000));

export const sleepRandomTime = async (n = 5) => sleep(Math.random() * n);